package com.woniuxy.sm.service.impl;

import com.woniuxy.sm.bean.Address;
import com.woniuxy.sm.mapper.AddressMapper;
import com.woniuxy.sm.service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class AddressServiceImpl implements AddressService {

    /**
     * 注入持久层对象不
     */
    @Autowired
    private AddressMapper addressMapper;


    //获取地址信息详情集合
    @Override
    public List<Address> findAddress() {
        return addressMapper.findAddress();
    }

    @Override
    public List<Address> findById(int uid) {
        return addressMapper.findById(uid);
    }



    @Override
    public void addAddress(Address add) {
        addressMapper.addAddress(add);
        //提交事务
     /*   sqlSession.commit();*/
    }
	
}
